package com.pwc.conversitonTool.soapui;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.StringReader;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import org.junit.Test;


public class XMLtest {

	String xmlString="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+"<config>"
	+"	<soap>"
		+"<endpoint>https://wd2-impl-services1.workday.com/ccx/service/pwc_dpt1/Staffing/v25.0?wsdl</endpoint>"
		+"<username>hyang-impl@pwc_dpt1</username>"
		+"<password>Underall1@</password>"
		+"<passwordType>PasswordText</passwordType>"
	+"</soap>"	
	+"<application>"
		+"<upload-csv-template>/home/yuanhuang/Desktop/workday/csvTemplate</upload-csv-template>"
		+"<upload-csv>C:\\Users\\dwu102\\Desktop\\workday\\upload</upload-csv>"
		+"<mid-relation>/home/yuanhuang/Desktop/workday/relation/</mid-relation>"
	+"</application>"
+"</config>";
	
	
//	@Test
//	public void testADD() throws DocumentException
//	{
//		//SAXReader reader = new SAXReader();
//		//Document document = reader.read(new StringReader(xmlString));
//		
//		
//	}
//	
	@Test
	public void test() throws IOException{
		String saveData="asaca";
		BufferedWriter out = null;
        out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("C:\\Users\\dwu102\\Desktop\\workday\\upload\\test.txt", true)));
		out.write("\r\n"+saveData+"\r\n");
		out.close();
	}
}
